﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;

namespace ProjetAGL
{
    class Assignation : IAssignation
    {
        Pioche a = new Pioche();
        char[] tableau = new char[6];

        public char[] assignation(Label lblLettre1, Label lblLettre2, Label lblLettre3, Label lblLettre4, Label lblLettre5, Label lblLettre6)
        {
            int i = 0;
            char[] lettre = a.piocher();
            string mot;

            Label[] lray = { lblLettre1, lblLettre2, lblLettre3, lblLettre4, lblLettre5, lblLettre6 };
            foreach (Label label in lray)
            {
                mot = Char.ToString(lettre[i]);
                label.Text = mot;
                tableau[i] = lettre[i];
                i++;
            }
            return tableau;
        }

    }
}
